# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 1.4.0
    Contact: james@firefly-iii.org
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from firefly_iii_client.configuration import Configuration


class AutocompleteAccount(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'currency_code': 'str',
        'currency_decimal_places': 'int',
        'currency_id': 'int',
        'currency_symbol': 'str',
        'id': 'int',
        'name': 'str',
        'name_with_balance': 'str',
        'type': 'str'
    }

    attribute_map = {
        'currency_code': 'currency_code',
        'currency_decimal_places': 'currency_decimal_places',
        'currency_id': 'currency_id',
        'currency_symbol': 'currency_symbol',
        'id': 'id',
        'name': 'name',
        'name_with_balance': 'name_with_balance',
        'type': 'type'
    }

    def __init__(self, currency_code=None, currency_decimal_places=None, currency_id=None, currency_symbol=None, id=None, name=None, name_with_balance=None, type=None, local_vars_configuration=None):  # noqa: E501
        """AutocompleteAccount - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._currency_code = None
        self._currency_decimal_places = None
        self._currency_id = None
        self._currency_symbol = None
        self._id = None
        self._name = None
        self._name_with_balance = None
        self._type = None
        self.discriminator = None

        self.currency_code = currency_code
        self.currency_decimal_places = currency_decimal_places
        self.currency_id = currency_id
        self.currency_symbol = currency_symbol
        self.id = id
        self.name = name
        self.name_with_balance = name_with_balance
        self.type = type

    @property
    def currency_code(self):
        """Gets the currency_code of this AutocompleteAccount.  # noqa: E501

        Currency code for this account.  # noqa: E501

        :return: The currency_code of this AutocompleteAccount.  # noqa: E501
        :rtype: str
        """
        return self._currency_code

    @currency_code.setter
    def currency_code(self, currency_code):
        """Sets the currency_code of this AutocompleteAccount.

        Currency code for this account.  # noqa: E501

        :param currency_code: The currency_code of this AutocompleteAccount.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and currency_code is None:  # noqa: E501
            raise ValueError("Invalid value for `currency_code`, must not be `None`")  # noqa: E501

        self._currency_code = currency_code

    @property
    def currency_decimal_places(self):
        """Gets the currency_decimal_places of this AutocompleteAccount.  # noqa: E501


        :return: The currency_decimal_places of this AutocompleteAccount.  # noqa: E501
        :rtype: int
        """
        return self._currency_decimal_places

    @currency_decimal_places.setter
    def currency_decimal_places(self, currency_decimal_places):
        """Sets the currency_decimal_places of this AutocompleteAccount.


        :param currency_decimal_places: The currency_decimal_places of this AutocompleteAccount.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and currency_decimal_places is None:  # noqa: E501
            raise ValueError("Invalid value for `currency_decimal_places`, must not be `None`")  # noqa: E501

        self._currency_decimal_places = currency_decimal_places

    @property
    def currency_id(self):
        """Gets the currency_id of this AutocompleteAccount.  # noqa: E501

        Currency ID for this account.  # noqa: E501

        :return: The currency_id of this AutocompleteAccount.  # noqa: E501
        :rtype: int
        """
        return self._currency_id

    @currency_id.setter
    def currency_id(self, currency_id):
        """Sets the currency_id of this AutocompleteAccount.

        Currency ID for this account.  # noqa: E501

        :param currency_id: The currency_id of this AutocompleteAccount.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and currency_id is None:  # noqa: E501
            raise ValueError("Invalid value for `currency_id`, must not be `None`")  # noqa: E501

        self._currency_id = currency_id

    @property
    def currency_symbol(self):
        """Gets the currency_symbol of this AutocompleteAccount.  # noqa: E501


        :return: The currency_symbol of this AutocompleteAccount.  # noqa: E501
        :rtype: str
        """
        return self._currency_symbol

    @currency_symbol.setter
    def currency_symbol(self, currency_symbol):
        """Sets the currency_symbol of this AutocompleteAccount.


        :param currency_symbol: The currency_symbol of this AutocompleteAccount.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and currency_symbol is None:  # noqa: E501
            raise ValueError("Invalid value for `currency_symbol`, must not be `None`")  # noqa: E501

        self._currency_symbol = currency_symbol

    @property
    def id(self):
        """Gets the id of this AutocompleteAccount.  # noqa: E501


        :return: The id of this AutocompleteAccount.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this AutocompleteAccount.


        :param id: The id of this AutocompleteAccount.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and id is None:  # noqa: E501
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

    @property
    def name(self):
        """Gets the name of this AutocompleteAccount.  # noqa: E501

        Name of the account found by an auto-complete search.  # noqa: E501

        :return: The name of this AutocompleteAccount.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this AutocompleteAccount.

        Name of the account found by an auto-complete search.  # noqa: E501

        :param name: The name of this AutocompleteAccount.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

    @property
    def name_with_balance(self):
        """Gets the name_with_balance of this AutocompleteAccount.  # noqa: E501

        Asset accounts and liabilities have a second field with the given date's account balance.  # noqa: E501

        :return: The name_with_balance of this AutocompleteAccount.  # noqa: E501
        :rtype: str
        """
        return self._name_with_balance

    @name_with_balance.setter
    def name_with_balance(self, name_with_balance):
        """Sets the name_with_balance of this AutocompleteAccount.

        Asset accounts and liabilities have a second field with the given date's account balance.  # noqa: E501

        :param name_with_balance: The name_with_balance of this AutocompleteAccount.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and name_with_balance is None:  # noqa: E501
            raise ValueError("Invalid value for `name_with_balance`, must not be `None`")  # noqa: E501

        self._name_with_balance = name_with_balance

    @property
    def type(self):
        """Gets the type of this AutocompleteAccount.  # noqa: E501

        Account type of the account found by the auto-complete search.  # noqa: E501

        :return: The type of this AutocompleteAccount.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this AutocompleteAccount.

        Account type of the account found by the auto-complete search.  # noqa: E501

        :param type: The type of this AutocompleteAccount.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and type is None:  # noqa: E501
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501

        self._type = type

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, AutocompleteAccount):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, AutocompleteAccount):
            return True

        return self.to_dict() != other.to_dict()
